import request from '@/utils/request'
import {parseStrEmpty} from "@/utils/ruoyi";

// 查询设备
export function listDeviceInfo(query) {
  return request({
    url: '/device/deviceInfo/selectDeviceInfoList',
    method: 'get',
    params: query
  })
}

//查询详情
export function selectDeviceInfo(uid) {
  return request({
    url: '/device/deviceInfo/selectDeviceInfo/' + parseStrEmpty(uid),
    method: 'get',
  })
}


//获取设备在线数
export function getDeviceOnLineCount(){
  return request({
    url: '/device/deviceInfo/getDeviceOnLineCount',
    method: 'get',
  })
}

//插入
export function insertDeviceInfo(data) {
  return request({
    url: '/device/deviceInfo/insertDeviceInfo',
    method: 'post',
    data: data
  })
}


// 修改日志是否自动上报
export function updateDeviceInfoLogStatus(data) {
  return request({
    url: '/device/deviceInfo/updateDeviceInfoLogStatus',
    method: 'post',
    data: data
  })
}

//删除设备
export function deleteDeviceInfoList(data) {
  return request({
    url: '/device/deviceInfo/deleteDeviceInfoList',
    method: 'post',
    data: data
  })
}

//修改设备
export function updateDeviceInfo(data) {
  return request({
    url: '/device/deviceInfo/updateDeviceInfo',
    method: 'post',
    data: data
  })
}



